<style scoped>
	.ivu-form-item {
        margin-bottom: 8px;
    }

    .ivu-form-item-content p {
        color: #333333;
    }

    .ivu-form .ivu-form-item-label {
        color: #7d7e7f;
    }

    .customContent {
        background: #f7fbff;
    }
</style>
<template>
	<div>
		<Card>
			<div slot="title">
				<a @click="close" class="back-title">
					<Icon type="ios-arrow-back" style="margin: 0 0 2px 0" />
					返回
				</a>
			</div>
			<Collapse v-model="panelValue">
				<Panel name="1">投票活动信息
					<div slot="content" class="customContent">
						<Form ref="voteForm" :model="voteForm" :label-width="110">
							<FormItem label="活动名称：" prop="voteName">
								{{vote.voteName}}
							</FormItem>
							<FormItem label="活动时间：" prop="voteName">
								{{vote.timeStart}} ~ {{vote.timeEnd}}
							</FormItem>
						</Form>
					</div>
				</Panel>

				<Panel name="2">活动设备
					<voteItemManage :voteId="vote.id" slot="content" />
				</Panel>
			</Collapse>
		</Card>
	</div>

</template>

<script>
	import voteItemManage from "./vote-item-manage.vue";
	export default {
		name: "vote-detail",
		props: {
			vote: {
				type: Object,
				required: true
			},
		},
		components: {
			voteItemManage
		},

		data() {
			return {
				panelValue: ['1', '2'],
			};
		},
		methods: {
			init() {

			},
			close() {
				this.$emit("close", true);
			},
		},
		mounted() {
			this.init();
		}
	};
</script>
